package com.docking.heylo.dao.mapper;

import com.docking.heylo.dao.entity.BuddyRecord;
import com.docking.heylo.dao.entity.BuddyRecordExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface BuddyRecordMapper {
    long countByExample(BuddyRecordExample example);

    int deleteByExample(BuddyRecordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(BuddyRecord record);

    int insertSelective(BuddyRecord record);

    List<BuddyRecord> selectByExample(BuddyRecordExample example);

    BuddyRecord selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") BuddyRecord record, @Param("example") BuddyRecordExample example);

    int updateByExample(@Param("record") BuddyRecord record, @Param("example") BuddyRecordExample example);

    int updateByPrimaryKeySelective(BuddyRecord record);

    int updateByPrimaryKey(BuddyRecord record);

    /***
     * 好友列表
     *
     * @param userId
     *
     * @return
     */
    List<Map<String,Object>> list(@Param("userId") int userId, @Param("userName") String userName);


    BuddyRecord friend(@Param("userA") int userA, @Param("userB") int userB);
}